Api.WriteOutputBit 方法
將一個位元寫入實體或模擬 I/O 模組的輸出。
命名空間:IntervalZero.KINGSTAR.Local.Api
組合: IntervalZero.KINGSTAR.Local.Api (於 IntervalZero.KINGSTAR.Local.dll) 版本:4.4.0.0
語法
public KsError WriteOutputBit(
int Index,
int BitOffset,
bool Value
)
Public Function WriteOutputBit(
Index As Integer,
BitOffset As Integer,
Value As Boolean
) As KsError
參數
Index
型別:int
I/O 模組的索引。索引以 0 為起始;別名將影響此參數。
BitOffset
型別:int
指定位元偏移量到一個位置,以寫入位元值。最大偏移量由 SlaveStatus 類別中的 OutputLength決定。
Value
型別:bool
欲寫入的值。true:寫入 1;false:寫入 0。
回傳值
方法的回傳代碼。
備註
WriteOutputBit 僅能在連結建立並開始啟用時才能呼叫。
可用的 EtherCAT 狀態
ecatOP
範例
N/A
參見